BI.namespace('sprite');

BI.sprite.DrawableSprite = new Class({
	Extends : BI.sprite.BaseSprite,
	
	initialize : function(x, y, config) {
		this.parent(x, y, config);
	},
	
	draw : function(context) {
		context.drawContext.beginPath();
		this.doDraw(context);
		context.drawContext.closePath();
		
		if (this.fillColor){
			context.drawContext.fillStyle = this.fillColor;
			context.drawContext.fill();
		}
	},
	
	doDraw : function (context){
		throw new Error("Mehod not implemented");
	},
	
	isTouched : function(x, y, context) {
		return context.drawContext.isPointInPath(x, y);
	}
});